<?php

if($page=='article'){
	
?>
<div class="clearfix" id="section_nav">
    <div class="grid_12 news_bg clearfix" style="margin: 0;">
        <span class="section_title"><?=$article['column_name']?></span>
        
        <dl>
            <dt></dt>
            
            <?php 
            	$current = " current ";
            	$subcols = $this->datam->getSubcolumnsByColumn($article['cId']);
                foreach($subcols as $subcol){
                	echo "<dd><a id='{$article['cId']}-{$subcol['id']}' onclick='javascript:article_subsection({$article['cId']},{$subcol['id']});' title='{$subcol['name']}' class='tabs_item {$current}' href='javascript:void(null)'>{$subcol['name']}</a></dd>";
                	$current = "";
                }
            ?>
        </dl>
          
    </div>
</div>
<?php }

?> 
<div class="scroll" id="novevijesti" style="margin-top: 0; <? if($page=='article')echo 'border:0';?> ">
	<div class='loading' id='loading'></div>
	<div class='empty' id='empty'>Нема пронађених чланака.</div>
    <div class="items clearfix" id='scroller_items'>
    	
        <?php 

            $i=1;
            //foreach ($articles_line as $line_article) {
            foreach ($articles_line as $line_article) {

                $link = base_url().sredinaslov($line_article['title'],$line_article['id'],$line_article['sName']);

                $cssBgImageOverwrite = "";
                $cssBorderOverwrite = "";

                switch($line_article['mType']){

                    case 'yt':
                        $cssBgImageOverwrite = ' nadnaslovVid';
                        $cssBorderOverwrite = ' kockaimgVid';
                        break;
                }
                
                //$hide = "";
				//if($line_article['id']==188) $hide = " style='display:none;' ";
                echo "<div class='kocka2' id='{$line_article['id']}' >"; //{$hide}
                

            ?>

            <div class='kocka2img<?=$cssBorderOverwrite?>'>
                <a class="mPhoto" href="<?=$link?>"> <?

                        switch($line_article['mType']){
                            case 'img':
                            ?>
                            <img src="<?=$url.'cache/'.$this->img_map->showImage($line_article['mFile'],158,105,"exacttop");?>" alt="<?=$line_article['caption']?>" title="<?=$line_article['caption']?>" width="158" height="105" />
                            <?
                                break;

                            case 'yt':
                            ?>
                            <img src="<?=$url.'cache/'.$this->img_map->showImage($line_article['mFile'].".jpg",158,105,"exacttop");?>" alt="<?=$line_article['caption']?>" title="<?=$line_article['caption']?>" width="158" height="105" />
                            <?
                                break;
                        }

                    ?>

                    <div class="nadnaslov<?=$cssBgImageOverwrite?>"><?
                            if ($line_article['mType']=='yt'){
                                echo 'Video';
                            }else{
                                if(strlen($line_article['uptitle'])>25){
                                    echo $line_article['cName'];
                                }else echo $line_article['uptitle']; 
                            }

                    ?></div>
                </a>

            </div>
            <?

                echo '<div style="clear: both;"></div>';
                echo "<h4><a class='mLink' href='$link'>{$line_article['title']}</a></h4>";

                echo "</div>";

                $i++;
            }
        ?>


    </div>

</div>


